<template>
  <div>
    <input type="text" v-model="value" />
    <span>{{ value }}</span>
    <button @click="submit">提交</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      value: "",
    };
  },
  methods: {
    submit() {
      this.$emit("getValue", this.value);
    },
  },
};
</script>
